package com.example.unisys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.unisys.entity.SubCourse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SubCourseMapper extends BaseMapper<SubCourse> {

    int insert(SubCourse subcourse);

    int insertSelective(SubCourse subcourse);

    int update(SubCourse subcourse);

    List<SubCourse> getBySchool(@Param("main_school")String main_school, @Param("sub_school")String sub_school,@Param("start")int start,@Param("page") int page);

    Integer getSchoolSum(@Param("main_school")String main_school,@Param("sub_school")String sub_school);

    SubCourse getById(@Param("main_school")String main_school,@Param("sub_school")String sub_school,@Param("course_id")String course_id);

    int getAllCourse(@Param("main_school") String main_school,@Param("sub_school") String sub_school);


    int getCourseSum(String main_school, String sub_school);

    int delete(String course_id);
}
